package main

import "fmt"

type calculation func(int, int) int

func main() {
	var c calculation
	c = add
	fmt.Printf("type of c: %T\n", c)

	fmt.Println(c(1, 2))

	f := sub
	fmt.Printf("type of f: %T\n", f)
	fmt.Println(f(99, 1))
}

func add(x, y int) int {
	return x + y
}

func sub(x, y int) int {
	return x - y
}
